<%@ taglib uri="/struts-tags" prefix="s"%>
<html>
<head>
</head>
<body>
	<div id="listAttachment">
		<table id="grid-selection"
			class="table table-condensed table-hover table-striped">
			<thead>
				<tr>
					<th data-column-id="idExecptionCodes">ID</th>
					<th data-column-id="idCop">ID Cop</th>
					<th data-column-id="exceptionCodes">Attachment Name</th>
					<th data-column-id="exceptionLogin">Download</th>
					<th data-column-id="description">Delete</th>
					
				</tr>
			</thead>

			<tbody>
			<s:iterator value="attachmentList" var="attachment">
				<tr>
					<td><s:property value="id" /></td>
					<td><s:property value="idCop" /></td>
					<td><s:property value="archiveName" /></td>
					<td><s:if test="%{#session.usuarioSession.cop == true}">
<%-- 							<s:a action="downloadFileCop" cssClass="button default"> --%>
<%-- 								<s:text name="Download" /> --%>
<%-- 								<s:param name="nameFileDownload" value="archiveName" /> --%>
								
<%-- 							</s:a> --%>
							<form class="form" method="post" action="downloadFileCop">
												<s:hidden name="nameFileDownload" value="%{#attachment.archiveName}" />
												<button type="submit" class="button default">Download</button>
							</form>
						</s:if></td>
					<td><s:if test="%{#session.usuarioSession.cop == true}">
								<button type="submit" class="center btn btn-primary"
									onclick='eliminaAdjunto("<s:property value="archiveName" />" , "<s:property value="id" />");'>
									Delete</button>
							</s:if></td>
					
				</tr>

			</s:iterator>



		</tbody>
		</table>

	</div>
</body>
</html>